<template>
	<z-paging ref="paging" v-model="dataList" @query="queryList">
		<view class v-for="(item,index) in dataList" :key="index">
			<view class="bg-primary text-white p-20 m-20 flex items-center justify-center rounded-md" @click="onHandle(item)">
				{{item}}</view>
		</view>
	</z-paging>
</template>

<script>
	export default {
		data() {
			return {
				dataList: []
			};
		},
		onLoad() {
			// console.log('router',router);
		},
		methods: {
			queryList(pageNo, pageSize) {
				try {
					setTimeout(() => {
						this.$refs.paging.complete(["1","2","3","4","5","6","7","8","9","10"]);
					}, 1500);
				} catch (error) {
					this.$refs.paging.complete(false);
				}
			},
			onHandle(m) {
				this.$routers.push({
					url: '/detail'
				})
			}
		}
	};
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>